package com.heifei

/**
 * @author caizhengjun
 * @date 2020/8/4 5:37 下午
 */
class User {

  var name = "tom"

  private var pet: String = "小强"

  private[this] var money: Double = 9999.99

  def printPet(): Unit = {
    println(this.pet)
  }

  def printMoney(): Unit = {
    println(money)
  }

}

object User {
  def main(args: Array[String]): Unit = {
    val user: User = new User
    println(user.pet)

    //println(user.money)

    user.printMoney()

  }
}
